<template>
  <div class="page-container main">
    <!--  <div class="tool-container">
      <el-form class="tool-search" :model="queryParams" ref="queryFormRef" :inline="true">
        <el-form-item>
          <el-input type="input" placeholder="附件名称" v-model="queryParams.openid" />
        </el-form-item>

        <el-form-item>
          <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
          <el-button icon="Refresh" @click="resetQuery">重置</el-button>
        </el-form-item>
      </el-form>
      
    </div>-->

    <div class="tabel-container myTable">
      <vxe-table ref="tableRef" :data="tableData" v-loading="loading">
        <vxe-table-column :resizable="true" type="seq" title="序号" width="80" sortable></vxe-table-column>
        <vxe-table-column :resizable="true" field="type" title="附件名称" sortable>
          <template #default="{ row }">
            {{$common.marchType(row.type,dict.adjust_type)}}
          </template>
        </vxe-table-column>
        <vxe-table-column :resizable="true" field="quantity" title="数量" sortable> </vxe-table-column>
        <vxe-table-column :resizable="true" field="actualPayment" title="实付款(元)" sortable>
          <template #default="{ row }"> {{row.actualPayment/100}}</template>
        </vxe-table-column>
        <vxe-table-column :resizable="true" field="accessoryPrice" title="总金额(元)" sortable>
          <template #default="{ row }">{{row.accessoryPrice/100}} </template>
        </vxe-table-column>
      </vxe-table>
    </div>
    <!-- <div class="myPager">
      <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
    </div> -->
  </div>
</template>

<script lang="ts">
import { targetedList } from '@/api/operation/activity/index';
import { listUser } from '@/api/system/user/index';

import common from '@/utils/common.ts';

export default {
  props: {
    data: {}
  },
  computed: {},
  data() {
    return {
      loading: false,
      dict: {},
      users: [],
      tableData: [],
      total: 1,
      queryParams: {
        createBy: null,
        openid: null,
        timeFrom: '',
        timeTo: '',
        activityId: '',
        pageNum: 1,
        pageSize: 5
      }
    };
  },
  mounted() {
    const { proxy } = getCurrentInstance() as ComponentInternalInstance;
    this.proxy = proxy;

    this.dict = toRefs<any>(this.proxy?.useDict('adjust_type'));

    this.init();
  },
  methods: {
    init(data) {
      if (data == null) data = this.data;
      this.tableData = data;
    }
  }
};
</script>
